package com.jp.springboot;

import com.jp.springboot.po.SampleBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/common/*")
public class SBPDemoController {

    @Autowired
    private SampleBean sampleBean;

    //http://localhost:8080/common/hello
    @GetMapping("hello")
    public String hello(){
        System.out.println(sampleBean);
        return "Hello, Spring Boot";
    }
}
